Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rest Endpoint to post auto theme review results to theme trac ticket. #26

Closed
wants to merge 9 commits into from
Closed

Rest Endpoint to post auto theme review results to theme trac ticket. #26

wants to merge 9 commits into from

Conversation

StevenDufresne
Copy link
Contributor

@StevenDufresne StevenDufresne commented Mar 3, 2021

This PR has been moved from #25.

Description

This PR adds a Rest controller that will be used to post the results of automated theme testing to a theme Trac ticket.

Details

  • Url: //wordpress.org/themes/wp-json/themes/v1/github/{theme_slug}/{trac_ticket}.
  • Auth:Bearer {token} must be included.
  • Data format: content={message}

Ideal Rollout

We are already running tests on theme uploads: https://github.com/WordPress/theme-review-e2e/actions

We can start by only postings errors from the UI check. Since the majority of the tests only issue warnings, it will only post a subset of errors.

More specifically, it will catch:

  • Errors in PHP
  • Errors in JS
  • Unapproved links
  • Errors WCAG 2.0 Accessibility errors when the theme has accessible-ready.

Screenshot

The user that has posted the snippet below is not the same as the code. It will post the comment using the theme tracbot account.

@StevenDufresne StevenDufresne changed the title Add/auto review api endpoint Rest: Add endpoint to Mar 3, 2021
@StevenDufresne StevenDufresne changed the title Rest: Add endpoint to Rest Endpoint to post auto theme teview results to theme trac ticket. Mar 3, 2021
@StevenDufresne StevenDufresne changed the title Rest Endpoint to post auto theme teview results to theme trac ticket. Rest Endpoint to post auto theme review results to theme trac ticket. Mar 3, 2021
@carolinan
Copy link

The difficult part is going to be how to make the messages more understandable.

  1. Where do theme authors go if they are not sure what the error means or how to fix it?
    Are there going to be more resources at the Theme Review Action link, or is it only a link to the repo?

  2. How will the theme author know if they are required to fix it or if it is only recommended?

Right now, the theme check results are displayed in the trac ticket, and some authors has expressed that it is unclear:
Who is posting those results, and why,
If the author are meant to fix the problems or wait for a reviewer

Is the result also sent by email to the theme author?

@StevenDufresne
Copy link
Contributor Author

@carolinan What do you think about something like:
WordPress/theme-review-action#19

@StevenDufresne
Copy link
Contributor Author

I made some updates; here's an example of the output.

@StevenDufresne
Copy link
Contributor Author

Merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants